-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Log undeclared plugin only if it is not disabled #40081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.4-develop
Are you sure you want to change the base?
Conversation
Hi @thomas-kl1. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
We already have tons of completely unnecessary logs about Admin menu rendering, that noone needs. |
Hello @lbajsarowicz I totally agree. My description was not clear and I've tried to updated it in hope to be more understandable. Thanks for your feedback! |
@magento create issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @thomas-kl1,
Thanks for the contribution!
The changes looks good to us, but please add some automated test in accordance to DOD.
Thanks
@magento run all tests |
OFC. I'll check the existing tests and add new ones if necessary. |
@magento run all tests |
@magento run Integration Tests, Functional Tests CE, Functional Tests EE, Functional Tests B2B |
@magento run all tests |
@magento run Database Compare, Functional Tests B2B, Functional Tests CE, Functional Tests EE |
1 similar comment
@magento run Database Compare, Functional Tests B2B, Functional Tests CE, Functional Tests EE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @thomas-kl1,
Thanks for the changes!
Please refer to the below review comment. Apart from this please refer this #40086 (comment). We are unable to reproduce the issue mentioned here.
Thanks
private LoggerInterface $logger, | ||
private DirectoryList $directoryList, | ||
private array $scopePriorityScheme = ['global'], | ||
private string $appMode = State::MODE_DEFAULT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added required parameter without default, I guess we need to handle using ObjectManager.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a mandatory argument, it's optional as State::MODE_DEFAULT is the default value.
The value is processed via DI anyway:
Magento\Framework\App\State::PARAM_MODE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that, the argument list didn't changed, also it's a scalar value, so I don't see how the ObjectManager could handle that
Description (*)
Developer may disable a plugin from module (A) with a third party module (B).
The plugin is referenced in di.xml thanks to its name and the attribute "disabled" is set to 'true'. The attribute "type" is not set.
If the module (A) is removed, and the referenced plugin in module (B) is not removed, Magento will report this as an error (info level) in the logs. This has effect to flood the logs with false positive cases.
Indeed, we should only log the plugin who are actually undeclared and not used (enabled and missing instance).
Manual testing scenarios (*)
Module A:
Remove the plugin declaration from module A (above declaration).
Module B (with sequence on Module A):
Expected: no logs.
Actual: logs entries:
Contribution checklist (*)
Resolved issues: